import unittest
from yklx.lx5.Tools import Tools
from XTestRunner import HTMLTestRunner


if __name__ == '__main__':
    #生成日志
    run=unittest.defaultTestLoader.discover(start_dir='./',pattern='TestCase.py')
    Tools().info_log('wyy.text','w+')

    #发送邮件
    with open('wyycsbg.html','wb') as e:
        runner=HTMLTestRunner(stream=e,title='网易云商城测试报告',language='zh-CN')

        runner.run(run)
        Tools().send_eamil('网易云商城测试报告',['wyycsbg.html','wyy.text'])
